﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2010
// admin@franknagl.de
//
namespace SBIP
{
    using System.Windows.Forms;
    using System;
    using SBIP.Filter;

    /// <summary>Filter specified properties form.</summary>
    public partial class ExtractChannelForm : Form
    {
        ExtractChannel filter;

        /// <summary>
        /// Initializes a new instance of the <see cref="ExtractChannelForm"/> class.
        /// </summary>
        /// <param name="processor">The processor.</param>
        public ExtractChannelForm(Processor processor)
        {
            InitializeComponent();
            this.filter = new ExtractChannel();
            processor.Filter = this.filter;
        }

        private void RedRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (((RadioButton)sender).Checked)
                filter.Channel = RGB.R;
        }

        private void GreenRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (((RadioButton)sender).Checked)
                filter.Channel = RGB.G;
        }

        private void BlueRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (((RadioButton)sender).Checked)
                filter.Channel = RGB.B;
        }
    }
}
